﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="SiteTemplate.cs" company="Collaboris Ltd.">
//   Copyright (c) Collaboris Ltd. All rights Reserved.
// </copyright>
// <summary>
//   Defines the SiteTemplate type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Collaboris.Saf.Actions.Moss.Entities
{
    using System;
    using System.Xml.Serialization;

    using SharePoint.Wss.Attributes;
    using SharePoint.Wss.Entities;

    [Serializable]
    [CollaborisClass(Title = "Site Template",
        ReleaseStatus = ReleaseStatus.Beta,
        Summary = "Defines the parameters to identify a site template.")]
    public class SiteTemplate : WSSEntityBase
    {
        #region Fields

        /// <summary>
        /// SiteTemplate name
        /// </summary>
        private string name;

        /// <summary>
        /// LCID number.
        /// </summary>
        private uint? lcid;
        #endregion

        #region Properties

        [CollaborisProperty(
             Summary = "Specifies the name of internal site template.",
             Title = "Name",
             Required = true,
             Example = "SPSNEWS#0",
             InputHint = InputHint.SingleText)]
        [XmlAttribute]
        public string Name
        {
            get
            {
                return this.name;
            }

            set
            {
                this.name = value;
            }
        }

        [CollaborisProperty(
             Summary = "Specifies the name locale ID.",
             Title = "LCID",
             Required = false,
             Example = "1033",
             InputHint = InputHint.SingleText)]
        [XmlElement(IsNullable = true)]
        public uint? LCID
        {
            get
            {
                return this.lcid;
            }

            set
            {
                this.lcid = value;
            }
        }

        #endregion
    }
}
